package com.cskaoyan.vo.wxfree;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @program: mall
 * @description:
 * @author: Mr.Mengmeng
 * @create: 2021-04-12 00:04
 **/
@Data
public class WxCommentListVo {

    /**
     * data : [{"userInfo":{"nickName":"测试用户","avatarUrl":"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80"},"addTime":"2018-02-01 00:00:00","picList":["https://yanxuan.nosdn.127.net/218783173f303ec6d8766810951d0790.jpg"],"content":"布料很厚实，触感不错，洗过之后不缩水不掉色"},{"userInfo":{"nickName":"测试用户","avatarUrl":"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80"},"addTime":"2018-02-01 00:00:00","picList":["https://yanxuan.nosdn.127.net/33978a0d6f56d94c45e4fc594b4b8606.jpg"],"content":"料子很舒服，凉凉的，配合蚕丝被，夏天很凉快~"}]
     * count : 96
     * currentPage : 1
     */

    private long count;
    private Integer currentPage;
    private List<DataBean> data;

    public WxCommentListVo(long count, Integer currentPage, List<DataBean> data) {
        this.count = count;
        this.currentPage = currentPage;
        this.data = data;
    }

    public WxCommentListVo() {
    }

    @Data
    public static class DataBean {
        /**
         * userInfo : {"nickName":"测试用户","avatarUrl":"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80"}
         * addTime : 2018-02-01 00:00:00
         * picList : ["https://yanxuan.nosdn.127.net/218783173f303ec6d8766810951d0790.jpg"]
         * content : 布料很厚实，触感不错，洗过之后不缩水不掉色
         */

        private UserInfoBean userInfo;
        @DateTimeFormat
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date addTime;
        private String content;
        private String[] picList;

        @Data
        public static class UserInfoBean {
            /**
             * nickName : 测试用户
             * avatarUrl : https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80
             */

            private String nickName;
            private String avatarUrl;

            public UserInfoBean(String nickName, String avatarUrl) {
                this.nickName = nickName;
                this.avatarUrl = avatarUrl;
            }

            public UserInfoBean() {
            }
        }
    }
}
